home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_zsh.idb / usr / freeware / catman / u_man / cat1 / zshcompctl.Z / zshcompctl
Encoding:
Text File  |  1998-05-21  |  24.7 KB  |  529 lines

  1.  
  2.  
  3.  
  4.      ZZZZSSSSHHHHCCCCOOOOMMMMPPPPCCCCTTTTLLLL((((1111))))    zzzzsssshhhh vvvveeeerrrrssssiiiioooonnnn 3333....0000 ((((JJJJuuuunnnneeee 22226666,,,,    1111999999996666))))     ZZZZSSSSHHHHCCCCOOOOMMMMPPPPCCCCTTTTLLLL((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       zshcompctl - zsh programmable    completion
  10.  
  11.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  12.       ccccoooommmmppppccccttttllll [ -CCCCDDDDTTTT ] _o_p_t_i_o_n_s [ _c_o_m_m_a_n_d ... ]
  13.  
  14.       ccccoooommmmppppccccttttllll [ -CCCCDDDDTTTT ] _o_p_t_i_o_n_s
  15.            [ -xxxx _p_a_t_t_e_r_n _o_p_t_i_o_n_s - ... -- ]
  16.            [ ++++ _o_p_t_i_o_n_s [ -xxxx    ... -- ] ... [+] ]
  17.            [ _c_o_m_m_a_n_d ... ]
  18.  
  19.       ccccoooommmmppppccccttttllll -LLLL [ -CCCCDDDDTTTT ] [    _c_o_m_m_a_n_d    ... ]
  20.  
  21.       ccccoooommmmppppccccttttllll + _c_o_m_m_a_n_d ...
  22.  
  23.       Control the editor's completion behavior according to    the
  24.       supplied set of _o_p_t_i_o_n_s.  Various editing commands, notably
  25.       eeeexxxxppppaaaannnndddd----oooorrrr----ccccoooommmmpppplllleeeetttteeee----wwwwoooorrrrdddd, usually bound to TTTTAAAABBBB, will attempt
  26.       to complete a    word typed by the user,    while others, notably
  27.       ddddeeeelllleeeetttteeee----cccchhhhaaaarrrr----oooorrrr----lllliiiisssstttt, usually bound to    ^D in emacs editing
  28.       mode,    list the possibilities;    ccccoooommmmppppccccttttllll    controls what those
  29.       possibilities    are.  They may for example be filenames    (the
  30.       most common case, and    hence the default), shell variables,
  31.       or words from    a user-specified list.
  32.  
  33.      CCCCOOOOMMMMMMMMAAAANNNNDDDD FFFFLLLLAAAAGGGGSSSS
  34.       Completion of    the arguments of a command may be different
  35.       for each command or may use the default.  The    behavior when
  36.       completing the command word itself may also be separately
  37.       specified.  These correspond to the following    flags and
  38.       arguments, all of which (except for -LLLL) may be combined with
  39.       any combination of the _o_p_t_i_o_n_s described subsequently    in the
  40.       section OOOOPPPPTTTTIIIIOOOONNNN FFFFLLLLAAAAGGGGSSSS:
  41.  
  42.            _c_o_m_m_a_n_d ...
  43.             controls completion    for the    named commands,    which
  44.             must be listed last    on the command line.  If
  45.             completion is attempted for    a command with a
  46.             pathname containing    slashes    and no completion
  47.             definition is found, the search is retried with
  48.             the    last pathname component.  Note that aliases
  49.             are    expanded before    the command name is determined
  50.             unless the CCCCOOOOMMMMPPPPLLLLEEEETTTTEEEE____AAAALLLLIIIIAAAASSSSEEEESSSS    option is set.
  51.             Commands should not    be combined with the -DDDD, -CCCC or
  52.             -TTTT flags.
  53.            -DDDD   controls default completion    behavior for the
  54.             arguments of commands not assigned any special
  55.             behavior.  If no ccccoooommmmppppccccttttllll ----DDDD    command    has been
  56.             issued, filenames are completed.
  57.            -CCCC   controls completion    when the command word itself
  58.             is being completed.     If no ccccoooommmmppppccccttttllll ----CCCC command has
  59.             been issued,  the names of any executable command
  60.  
  61.  
  62.  
  63.      Page 1                         (printed 4/24/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      ZZZZSSSSHHHHCCCCOOOOMMMMPPPPCCCCTTTTLLLL((((1111))))    zzzzsssshhhh vvvveeeerrrrssssiiiioooonnnn 3333....0000 ((((JJJJuuuunnnneeee 22226666,,,,    1111999999996666))))     ZZZZSSSSHHHHCCCCOOOOMMMMPPPPCCCCTTTTLLLL((((1111))))
  71.  
  72.  
  73.  
  74.             (whether in    the path or specific to    the shell,
  75.             such as aliases or functions) are completed.
  76.            -TTTT   supplies completion    flags to be used before    any
  77.             other processing is    done, even those given to
  78.             specific commands with other compctl definitions.
  79.             This is only useful    when combined with extended
  80.             completion (the -xxxx flag, see the section EEEEXXXXTTTTEEEENNNNDDDDEEEEDDDD
  81.             CCCCOOOOMMMMPPPPLLLLEEEETTTTIIIIOOOONNNN below).    Using this flag    you can    define
  82.             default behavior which will    apply to all commands
  83.             without exception, or you can alter    the standard
  84.             behavior for all commands.    For example, if    your
  85.             access to the user database    is too slow and/or it
  86.             contains too many users (so    that completion    after
  87.             ~~~~ is too slow to be    usable), you can use
  88.             compctl    -Tx  'C[0,*/*]'    -f - 's[~]' -k friends -S/
  89.             to complete    the strings in the array ffffrrrriiiieeeennnnddddssss after
  90.             a ~~~~.  The first argument is    necessary so that this
  91.             form of ~-completion is not    tried after the
  92.             directory name is finished.
  93.            -LLLL   lists the existing completion behavior in a    manner
  94.             suitable for putting into a    start-up script; the
  95.             existing behavior is not changed.  Any combination
  96.             of the above forms may be specified, otherwise all
  97.             defined completions    are listed.  Any other flags
  98.             supplied are ignored.
  99.            _n_o _a_r_g_u_m_e_n_t
  100.             If no argument is given, ccccoooommmmppppccccttttllll lists all defined
  101.             completions    in an abbreviated form;     with a    list
  102.             of _o_p_t_i_o_n_s,    all completions    with those flags set
  103.             (not counting extended completion) are listed.
  104.  
  105.            If the +    flag is    alone and followed immediately by the
  106.            _c_o_m_m_a_n_d list, the completion behavior for all the
  107.            commands    in the list is reset to    the default.  In other
  108.            words, completion will subsequently use the options
  109.            specified by the    -DDDD flag.
  110.  
  111.      OOOOPPPPTTTTIIIIOOOONNNN FFFFLLLLAAAAGGGGSSSS
  112.       [ -ffffccccFFFFBBBBddddeeeeaaaaRRRRGGGGoooovvvvNNNNAAAAIIIIOOOOPPPPZZZZEEEEnnnnbbbbjjjjrrrrzzzzuuuu ]
  113.       [ -kkkk _a_r_r_a_y ] [ -gggg _g_l_o_b_s_t_r_i_n_g ] [ -ssss _s_u_b_s_t_s_t_r_i_n_g ]
  114.       [ -KKKK _f_u_n_c_t_i_o_n    ] [ -HHHH _n_u_m _p_a_t_t_e_r_n ]
  115.       [ -QQQQ ] [ -PPPP _p_r_e_f_i_x ] [ -SSSS _s_u_f_f_i_x ]
  116.       [ -qqqq ] [ -XXXX _e_x_p_l_a_n_a_t_i_o_n ]
  117.       [ -llll _c_m_d ] [ -UUUU ]
  118.  
  119.       The remaining    _o_p_t_i_o_n_s    specify    the type of command arguments
  120.       to look for during completion.  Any combination of these
  121.       flags    may be specified; the result is    a sorted list of all
  122.       the possibilities.  The options are as follows.
  123.  
  124.     SSSSiiiimmmmpppplllleeee ffffllllaaaaggggssss
  125.       These    produce    completion lists made up by the    shell itself:
  126.  
  127.  
  128.  
  129.      Page 2                         (printed 4/24/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      ZZZZSSSSHHHHCCCCOOOOMMMMPPPPCCCCTTTTLLLL((((1111))))    zzzzsssshhhh vvvveeeerrrrssssiiiioooonnnn 3333....0000 ((((JJJJuuuunnnneeee 22226666,,,,    1111999999996666))))     ZZZZSSSSHHHHCCCCOOOOMMMMPPPPCCCCTTTTLLLL((((1111))))
  137.  
  138.  
  139.  
  140.            -ffff   Filenames and filesystem paths.
  141.            -cccc   Command names, including aliases, shell functions,
  142.             builtins and reserved words.
  143.            -FFFF   Function names.
  144.            -BBBB   Names of builtin commands.
  145.            -mmmm   Names of external commands.
  146.            -wwww   Reserved words.
  147.            -aaaa   Alias names.
  148.            -RRRR   Names of regular (non-global) aliases.
  149.            -GGGG   Names of global aliases.
  150.            -dddd   This can be    combined with -FFFF, -BBBB, -wwww, -aaaa, -RRRR and
  151.             -GGGG to get names of disabled    functions, builtins,
  152.             reserved words or aliases.
  153.            -eeee   This option    (to show enabled commands) is in
  154.             effect by default, but may be combined with    -dddd;
  155.             -ddddeeee    in combination with -FFFF,    -BBBB, -wwww,    -aaaa, -RRRR and -GGGG
  156.             will complete names    of functions, builtins,
  157.             reserved words or aliases whether or not they are
  158.             disabled.
  159.            -oooo   Names of shell options (see    the zshoptions manual
  160.             page).
  161.            -vvvv   Names of any variable defined in the shell.
  162.            -NNNN   Names of scalar (non-array)    parameters.
  163.            -AAAA   Array names.
  164.            -IIII   Names of integer variables.
  165.            -OOOO   Names of read-only variables.
  166.            -pppp   Names of parameters    used by    the shell (including
  167.             special parameters).
  168.            -ZZZZ   Names of shell special parameters.
  169.            -EEEE   Names of environment variables.
  170.            -nnnn   Named directories.
  171.            -bbbb   Key    binding    names.
  172.            -jjjj   Job    names:    the first word of the job leader's
  173.             command line.  This    is useful with the kkkkiiiillllllll
  174.             builtin.
  175.            -rrrr   Names of running jobs.
  176.            -zzzz   Names of suspended jobs.
  177.            -uuuu   User names.
  178.     FFFFllllaaaaggggssss wwwwiiiitttthhhh aaaarrrrgggguuuummmmeeeennnnttttssss
  179.       These    have user supplied arguments to    determine how the list
  180.       of completions is to be made up:
  181.            -kkkk _a_r_r_a_y
  182.             Names taken    from the elements of $$$$aaaarrrrrrrraaaayyyy (note that
  183.             the    $$$$ does not appear on the command line).
  184.             Alternatively, the argument    _a_r_r_a_y itself may be a
  185.             set    of space- or comma-separated values in
  186.             parentheses, in which any delimiter    may be escaped
  187.             with a backslash; in this case the argument    should
  188.             be quoted.    For example,
  189.             compctl    -k "(cputime filesize datasize stacksize
  190.             coredumpsize resident descriptors)" limit
  191.            -gggg _g_l_o_b_s_t_r_i_n_g
  192.  
  193.  
  194.  
  195.      Page 3                         (printed 4/24/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      ZZZZSSSSHHHHCCCCOOOOMMMMPPPPCCCCTTTTLLLL((((1111))))    zzzzsssshhhh vvvveeeerrrrssssiiiioooonnnn 3333....0000 ((((JJJJuuuunnnneeee 22226666,,,,    1111999999996666))))     ZZZZSSSSHHHHCCCCOOOOMMMMPPPPCCCCTTTTLLLL((((1111))))
  203.  
  204.  
  205.  
  206.             The    _g_l_o_b_s_t_r_i_n_g is expanded using filename
  207.             globbing; it should    be quoted to protect it    from
  208.             immediate expansion. The resulting filenames are
  209.             taken as the possible completions.    Use `*(/)'
  210.             instead of `*/' for    directories.  The ffffiiiiggggnnnnoooorrrreeee
  211.             special parameter is not applied to    the resulting
  212.             files.  More than one pattern may be given
  213.             separated by blanks. (Note that brace expansion is
  214.             _n_o_t    part of    globbing.  Use the syntax
  215.             `(either|or)' to match alternatives.)
  216.            -ssss _s_u_b_s_t_s_t_r_i_n_g
  217.             The    _s_u_b_s_t_s_t_r_i_n_g is split into words    and these
  218.             words are than expanded using all shell expansion
  219.             mechanisms (see the    zzzzsssshhhheeeexxxxppppnnnn    manual page). The
  220.             resulting words are    taken as possible completions.
  221.             The    ffffiiiiggggnnnnoooorrrreeee    special    parameter is not applied to
  222.             the    resulting files.  Note that -gggg is faster for
  223.             filenames.
  224.            -KKKK _f_u_n_c_t_i_o_n
  225.             Call the given function to get the completions.
  226.             The    function is passed two arguments: the prefix
  227.             and    the suffix of the word on which    completion is
  228.             to be attempted, in    other words those characters
  229.             before the cursor position,    and those from the
  230.             cursor position onwards.  The function should set
  231.             the    variable rrrreeeeppppllllyyyy to an array containing the
  232.             completions    (one completion    per element); note
  233.             that rrrreeeeppppllllyyyy should not be made local    to the
  234.             function.  From such a function the    command    line
  235.             can    be accessed with the ----cccc    and ----llll flags to    the
  236.             rrrreeeeaaaadddd builtin.  For example,
  237.             function whoson    { reply=(`users`); }
  238.             compctl    -K whoson talk
  239.             completes only logged-on users after `talk'.  Note
  240.             that `whoson' must return an array so that
  241.             "reply=`users`" is incorrect.
  242.            -HHHH _n_u_m _p_a_t_t_e_r_n
  243.             The    possible completions are taken from the    last
  244.             _n_u_m    history    lines. Only words matching _p_a_t_t_e_r_n are
  245.             taken. If _n_u_m is zero or negative the whole
  246.             history is searched    and if _p_a_t_t_e_r_n is the empty
  247.             string all words are taken (as with    `****').  A
  248.             typical use    is
  249.             compctl    -D -f +    -H 0 ''    \
  250.             -X '(No    file found; using history)'
  251.             which forces completion to look back in the
  252.             history list for a word if no filename matches.
  253.             The    explanation string is useful as    it tells the
  254.             user that no file of that name exists, which is
  255.             otherwise ambiguous. (See the next section for
  256.             -XXXX).
  257.     CCCCoooonnnnttttrrrroooollll    ffffllllaaaaggggssss
  258.  
  259.  
  260.  
  261.      PPPPaaaaggggeeee 4444                         ((((pppprrrriiiinnnntttteeeedddd 4444////22224444////99998888))))
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      ZZZZSSSSHHHHCCCCOOOOMMMMPPPPCCCCTTTTLLLL((((1111))))    zzzzsssshhhh vvvveeeerrrrssssiiiioooonnnn 3333....0000 ((((JJJJuuuunnnneeee 22226666,,,,    1111999999996666))))     ZZZZSSSSHHHHCCCCOOOOMMMMPPPPCCCCTTTTLLLL((((1111))))
  269.  
  270.  
  271.  
  272.       These    do not directly    specify    types of name to be completed,
  273.       but manipulate the options that do:
  274.            -QQQQ   This instructs the shell not to quote any
  275.             metacharacters in the possible completions.
  276.             Normally the results of a completion are inserted
  277.             into the command line with any metacharacters
  278.             quoted so that they    are interpreted    as normal
  279.             characters.     This is appropriate for filenames and
  280.             ordinary strings.  However,    for special effects,
  281.             such as inserting a    backquoted expression from a
  282.             completion array (-kkkk) so that the expression will
  283.             not    be evaluated until the complete    line is
  284.             executed, this option must be used.
  285.            -PPPP _p_r_e_f_i_x
  286.             The    _p_r_e_f_i_x is inserted just    before the completed
  287.             string; any    initial    part already typed will    be
  288.             completed and the whole _p_r_e_f_i_x ignored for
  289.             completion purposes.  For example,
  290.             compctl    -j -P "%" kill
  291.             inserts a `%' after    the kill command and then
  292.             completes job names.
  293.            -SSSS _s_u_f_f_i_x
  294.             When a completion is found the _s_u_f_f_i_x is inserted
  295.             after the completed    string.     In the    case of    menu
  296.             completion the suffix is inserted immediately, but
  297.             it is still    possible to cycle through the list of
  298.             completions    by repeatedly hitting the same key.
  299.            -qqqq   If used with a suffix as specified by the previous
  300.             option, this causes    the suffix to be removed if
  301.             the    next character typed is    a blank    or does    not
  302.             insert anything (the same rule as used for the
  303.             AAAAUUUUTTTTOOOO____RRRREEEEMMMMOOOOVVVVEEEE____SSSSLLLLAAAASSSSHHHH option).    The option is most
  304.             useful for list separators (comma, colon, etc.).
  305.            -llll _c_m_d
  306.             This option    cannot be combined with    any other.  It
  307.             restricts the range    of command line    words that are
  308.             considered to be arguments.     If combined with one
  309.             of the extended completion patterns    `pppp[...]',
  310.             `rrrr[...]', or `RRRR[...]'  (see    the section EEEEXXXXTTTTEEEENNNNDDDDEEEEDDDD
  311.             CCCCOOOOMMMMPPPPLLLLEEEETTTTIIIIOOOONNNN below) the range    is restricted to the
  312.             range of arguments specified in the    brackets.
  313.             Completion is then performed as if these had been
  314.             given as arguments to the _c_m_d supplied with    the
  315.             option. If the _c_m_d string is empty the first word
  316.             in the range is instead taken as the command name,
  317.             and    command    name completion    performed on the first
  318.             word in the    range.    For example,
  319.             compctl    -x 'r[-exec,;]'    -l '' -- find
  320.             completes arguments    between    `-exec'    and the
  321.             following `;' (or the end of the command line if
  322.             there is no    such string) as    if they    were a
  323.             separate command line.
  324.  
  325.  
  326.  
  327.      Page 5                         (printed 4/24/98)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      ZZZZSSSSHHHHCCCCOOOOMMMMPPPPCCCCTTTTLLLL((((1111))))    zzzzsssshhhh vvvveeeerrrrssssiiiioooonnnn 3333....0000 ((((JJJJuuuunnnneeee 22226666,,,,    1111999999996666))))     ZZZZSSSSHHHHCCCCOOOOMMMMPPPPCCCCTTTTLLLL((((1111))))
  335.  
  336.  
  337.  
  338.            -UUUU   Use    the whole list of possible completions,
  339.             whether or not they    actually match the word    on the
  340.             command line.  The word typed so far will be
  341.             deleted.  This is most useful with a function
  342.             (given by the -KKKK option) which can examine the
  343.             word components passed to it (or via the rrrreeeeaaaadddd
  344.             builtin's -cccc and -llll    flags) and use its own
  345.             criteria to    decide what matches.  If there is no
  346.             completion,    the original word is retained.
  347.            -XXXX _e_x_p_l_a_n_a_t_i_o_n
  348.             Print _e_x_p_l_a_n_a_t_i_o_n when trying completion on    the
  349.             current set    of options. A `%n' in this string is
  350.             replaced by    the number of matches.
  351.  
  352.      AAAALLLLTTTTEEEERRRRNNNNAAAATTTTIIIIVVVVEEEE CCCCOOOOMMMMPPPPLLLLEEEETTTTIIIIOOOONNNN
  353.       ccccoooommmmppppccccttttllll [ -CCCCDDDDTTTT ] _o_p_t_i_o_n_s + _o_p_t_i_o_n_s [ + ... ] [ + ] _c_o_m_m_a_n_d
  354.       ...
  355.  
  356.       The form with    `++++' specifies alternative options. Completion
  357.       is tried with    the options before the first `+'. If this
  358.       produces no matches completion is tried with the flags after
  359.       the `+' and so on. If    there are no flags after the last `+'
  360.       and a    match has not been found up to that point, default
  361.       completion is    tried.
  362.  
  363.      EEEEXXXXTTTTEEEENNNNDDDDEEEEDDDD CCCCOOOOMMMMPPPPLLLLEEEETTTTIIIIOOOONNNN
  364.       ccccoooommmmppppccccttttllll [ -CCCCDDDDTTTT ] _o_p_t_i_o_n_s -xxxx _p_a_t_t_e_r_n _o_p_t_i_o_n_s -    ... -- [
  365.       _c_o_m_m_a_n_d ... ]
  366.  
  367.       ccccoooommmmppppccccttttllll [ -CCCCDDDDTTTT ] _o_p_t_i_o_n_s [ -xxxx    _p_a_t_t_e_r_n    _o_p_t_i_o_n_s    - ... -- ]
  368.            [ ++++ _o_p_t_i_o_n_s [ -xxxx    ... -- ] ... [+] ] [ _c_o_m_m_a_n_d ... ]
  369.  
  370.       The form with    `-xxxx' specifies extended    completion for the
  371.       commands given; as shown, it may be combined with
  372.       alternative completion using +.  Each    _p_a_t_t_e_r_n    is examined in
  373.       turn;    when a match is    found, the corresponding _o_p_t_i_o_n_s, as
  374.       described in the section OOOOPPPPTTTTIIIIOOOONNNN FFFFLLLLAAAAGGGGSSSS    above, are used    to
  375.       generate possible completions.  If no    _p_a_t_t_e_r_n    matches, the
  376.       _o_p_t_i_o_n_s given    before the -xxxx are used.
  377.  
  378.       Note that each pattern should    be supplied as a single
  379.       argument and should be quoted    to prevent expansion of
  380.       metacharacters by the    shell.
  381.  
  382.       A _p_a_t_t_e_r_n is built of    sub-patterns separated by commas; it
  383.       matches if at    least one of these sub-patterns    matches    (they
  384.       are `or'ed').    These sub-patterns are in turn composed    of
  385.       other    sub-patterns separated by white    spaces which match if
  386.       all of the sub-patterns match    (they are `and'ed').  An
  387.       element of the sub-patterns is of the    form `c[...][...]',
  388.       where    the pairs of brackets may be repeated as often as
  389.       necessary, and matches if any    of the sets of brackets    match
  390.  
  391.  
  392.  
  393.      Page 6                         (printed 4/24/98)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      ZZZZSSSSHHHHCCCCOOOOMMMMPPPPCCCCTTTTLLLL((((1111))))    zzzzsssshhhh vvvveeeerrrrssssiiiioooonnnn 3333....0000 ((((JJJJuuuunnnneeee 22226666,,,,    1111999999996666))))     ZZZZSSSSHHHHCCCCOOOOMMMMPPPPCCCCTTTTLLLL((((1111))))
  401.  
  402.  
  403.  
  404.       (an `or').  The example below    makes this clearer.
  405.  
  406.       The elements may be any of the following:
  407.  
  408.  
  409.            ssss[_s_t_r_i_n_g] ...
  410.             Matches if the current word    on the command line
  411.             starts with    one of the strings given in brackets.
  412.             The    _s_t_r_i_n_g is not removed and is not part of the
  413.             completion.
  414.            SSSS[_s_t_r_i_n_g] ...
  415.             Like ssss[_s_t_r_i_n_g] except that the _s_t_r_i_n_g is part of
  416.             the    completion.
  417.            pppp[_f_r_o_m,_t_o] ...
  418.             Matches if the number of the current word is
  419.             between one    of the _f_r_o_m and    _t_o pairs inclusive.
  420.             The    comma and _t_o are optional;  _t_o defaults    to the
  421.             same value as _f_r_o_m.    The numbers may    be negative:
  422.             -_n refers to the _n'th last word on the line.
  423.            cccc[_o_f_f_s_e_t,_s_t_r_i_n_g]    ...
  424.             Matches if the _s_t_r_i_n_g matches the word offset by
  425.             _o_f_f_s_e_t from    the current word position.  Usually
  426.             _o_f_f_s_e_t will    be negative.
  427.            CCCC[_o_f_f_s_e_t,_p_a_t_t_e_r_n] ...
  428.             Like cccc but using pattern matching instead.
  429.            wwww[_i_n_d_e_x,_s_t_r_i_n_g] ...
  430.             Matches if the word    in position _i_n_d_e_x is equal to
  431.             the    corresponding _s_t_r_i_n_g.  Note that the word
  432.             count is made after    any alias expansion.
  433.            WWWW[_i_n_d_e_x,_p_a_t_t_e_r_n]    ...
  434.             Like wwww but using pattern matching instead.
  435.            nnnn[_i_n_d_e_x,_s_t_r_i_n_g] ...
  436.             Matches if the current word    contains _s_t_r_i_n_g.
  437.             Anything up    to and including the _i_n_d_e_x'th
  438.             occurrence of this string will not be considered
  439.             part of the    completion, but    the rest will.    _I_n_d_e_x
  440.             may    be negative to count from the end:  in most
  441.             cases, _i_n_d_e_x will be 1 or -1.
  442.            NNNN[_i_n_d_e_x,_s_t_r_i_n_g] ...
  443.             Like nnnn[_i_n_d_e_x,_s_t_r_i_n_g] except    that the string    will
  444.             be taken as    a character class.  Anything up    to and
  445.             including the _i_n_d_e_x'th occurrence of any of    the
  446.             characters in _s_t_r_i_n_g will not be considered    part
  447.             of the completion.
  448.            mmmm[_m_i_n,_m_a_x] ...
  449.             Matches if the total number    of words lies between
  450.             _m_i_n    and _m_a_x    inclusive.
  451.            rrrr[_s_t_r_1,_s_t_r_2]...
  452.             Matches if the cursor is after a word with prefix
  453.             _s_t_r_1. If there is also a word with prefix _s_t_r_2 on
  454.             the    command    line it    matches    only if    the cursor is
  455.             before this    word.
  456.  
  457.  
  458.  
  459.      Page 7                         (printed 4/24/98)
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      ZZZZSSSSHHHHCCCCOOOOMMMMPPPPCCCCTTTTLLLL((((1111))))    zzzzsssshhhh vvvveeeerrrrssssiiiioooonnnn 3333....0000 ((((JJJJuuuunnnneeee 22226666,,,,    1111999999996666))))     ZZZZSSSSHHHHCCCCOOOOMMMMPPPPCCCCTTTTLLLL((((1111))))
  467.  
  468.  
  469.  
  470.            RRRR[_s_t_r_1,_s_t_r_2]...
  471.             Like rrrr but using pattern matching instead.
  472.  
  473.      EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  474.            compctl -u -x 's[+] c[-1,-f],s[-f+]' -g '~/Mail/*(:t)' \
  475.            - 's[-f],c[-1,-f]' -f --    mail
  476.  
  477.       This is to be    interpreted as follows:
  478.  
  479.       If the current command is mmmmaaaaiiiillll, then
  480.  
  481.            if ((the    current    word begins with + and the previous
  482.            word is -f) or (the current word    begins with -f+)),
  483.            then complete the non-directory part (the :t glob
  484.            modifier) of files in the directory ~/Mail; else
  485.  
  486.            if the current word begins with -f or the previous word
  487.            was -f, then complete any file; else
  488.  
  489.            complete    user names.
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.      Page 8                         (printed 4/24/98)
  526.  
  527.  
  528.  
  529.